using System.Data;

namespace Firestarter.DB.Schema.Logic
{
    public class DBSchemaTemplate
    {
        public static class DataTableNaming
        {
            public const string Databases = "Databases";
            public const string DataTypes = "DataTypes";
            public const string Tables = "Tables";
            public const string Columns = "Columns";
            public const string UniqueKeys = "UniqueKeys";
            public const string PrimaryKeys = "PrimaryKeys";
            public const string KeyColumns = "KeyColumns";
            public const string ForeignKeys = "ForeignKeys";
            public const string ForeignKeyColumns = "ForeignKeyColumns";
        }

        public static class Naming
        {
            public const string TableTypeIsTable = "BASE TABLE";
            public const string TableTypeIsView = "VIEW";
            public const string CatalogName = "CATALOG_NAME";
            //public const string ColumnType = "DATA_TYPE";
            public const string SchemaName = "SCHEMA_NAME";

            public const string TableCatalog = "TABLE_CATALOG";
            public const string TableSchema = "TABLE_SCHEMA";
            public const string TableName = "TABLE_NAME";
            public const string TableType = "TABLE_TYPE";

            public const string ColumnName = "COLUMN_NAME";
            public const string ColumnDefault = "COLUMN_DEFAULT";
            public const string ColumnIsNullable = "IS_NULLABLE";
            public const string ColumnIsAutoIncrement = "IS_AUTO_INCREMENT";

            public const string KeyCatalog = "KEY_CATALOG";
            public const string KeySchema = "KEY_SCHEMA";
            public const string KeyName = "KEY_NAME";

            public const string ReferencedTableCatalog = "REFERENCED_TABLE_CATALOG";
            public const string ReferencedTableSchema = "REFERENCED_TABLE_SCHEMA";
            public const string ReferencedTableName = "REFERENCED_TABLE_NAME";
            public const string ReferencedColumnName = "REFERENCED_COLUMN_NAME";

            public const string OrdinalPosition = "ORDINAL_POSITION";

            public const string DataType = "DATA_TYPE";
            public const string CharacterMaximumLength = "CHARACTER_MAXIMUM_LENGTH";
            public const string NumericPrecision = "NUMERIC_PRECISION";
            public const string NumericScale = "NUMERIC_SCALE";

            public const string TypeName = "TypeName";
            public const string ProviderDbType = "ProviderDbType";
            public const string ColumnSize = "ColumnSize";
            public const string CreateFormat = "CreateFormat";
            public const string CreateParameters = "CreateParameters";
            public const string SystemType = "DataType";
            public const string IsAutoIncrementable = "IsAutoIncrementable";
            public const string IsBestMatch = "IsBestMatch";
            public const string IsCaseSensitive = "IsCaseSensitive";
            public const string IsFixedLength = "IsFixedLength";
            public const string IsFixedPrecisionScale = "IsFixedPrecisionScale";
            public const string IsLong = "IsLong";
            public const string IsNullable = "IsNullable";
            public const string IsSearchable = "IsSearchable";
            public const string IsSearchableWithLike = "IsSearchableWithLike";
            public const string IsUnsigned = "IsUnsigned";
            public const string MaximumScale = "MaximumScale";
            public const string MinimumScale = "MinimumScale";
            public const string IsConcurrencyType = "IsConcurrencyType";
            public const string IsLiteralSupported = "IsLiteralSupported";
            public const string LiteralPrefix = "LiteralPrefix";
            public const string LiteralSuffix = "LiteralSuffix";
        }
        public static DataTable GetDatabasesDataTable()
        {
            DataTable dataTable = new DataTable(DBSchemaTemplate.DataTableNaming.Databases);
            dataTable.Columns.Add(DBSchemaTemplate.Naming.CatalogName);
            dataTable.Columns.Add(DBSchemaTemplate.Naming.SchemaName);
            return dataTable;
        }
    }
}
